/**
 * \file
 *         Header file for Trickle (reliable single source flooding) for Ipv6
 */

#include "sys/ctimer.h"

struct trickle_ipv6;

#define TRICKLE_MSG  0

struct trickle_ipv6 {
  struct ctimer t, interval_timer, first_transmission_timer;
  struct pt pt;
  clock_time_t interval;
  uint16_t seqno;
  uint8_t interval_scaling;
  uint8_t duplicates;
};

/** \brief set IP address a to the link local all-trickle nodes multicast address */
#define uip_create_linklocal_tricklenodes_mcast(a) uip_ip6addr(a, 0xff02, 0, 0, 0, 0, 0, 0, 0x001d)


void trickle_ipv6_init(clock_time_t interval);
void trickle_ipv6_send(void);
void trickle_ipv6_input(void);

/** @} */
/** @} */

